#ifndef PROXYVALIDATIONTASK_H
#define PROXYVALIDATIONTASK_H

//#include <QObject>
//#include <QRunnable>
#include "precomp.h"
#include "publicstruct.h"

class ProxyValidationTask : public QObject, public QRunnable
{
    Q_OBJECT
public:
//explicit ProxyValidationTask(const QString &proxy, QObject *parent = nullptr);
    explicit ProxyValidationTask(const ProxyServerData &proxyServerData, QObject *parent = nullptr);
    ~ProxyValidationTask() override;

    void run() override;
public slots:
    void stopTask();
signals:
    void proxyResult( QString proxyStr, QString retStr);
    void exitTask();
private:
    QString m_proxy,m_proxyaddr;
    QString m_host,m_testproxydest;
    int m_port;
    //QAtomicInt &m_finishedTasks;
    ProxyServerData m_proxyServerData;
};

#endif // PROXYVALIDATIONTASK_H
